﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreedomERP.Models;
using FreedomERP.Comm;
using FreedomERP.Models.Sd;

namespace FreedomERP.Services.Sd
{
    interface ISdSaleOrderService
    {
        /// <summary>
        /// 根据条件获取列表
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        List<SdSaleOrder> QuerySaleOrderPaggingByParam(PagingParams paggingParams, out int totalCount);

        /// <summary>
        /// 根据FId获取订单信息
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        SdSaleOrder GetSaleOrderByFId(String FId);

        /// <summary>
        /// 添加订单
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        void AddSaleOrder(SdSaleOrderView saleOrderView, string currAccountFId, string currOrgunitFId, out string FId);

        /// <summary>
        /// 修改订单
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        void ModifySaleOrder(SdSaleOrderView saleOrderView, string currAccountFId);

        /// <summary>
        /// 审核订单
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        void ApproveSaleOrder(string FId, string currAccountFId);

        /// <summary>
        /// 反审核订单
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        void UnApproveSaleOrder(string FId, string currAccountFId);

        /// <summary>
        /// 获取订单明细
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        List<SdSaleOrderDetail> GetSaleOrderDetailListByFParentId(string FParentId);
    }
}
